﻿Public Class FrmInfoApplication

    Private Sub FrmInfoApplication_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With My.Application.Info
            lblTitle.Text = .ProductName
            lblDescription.Text = UCase(.Description)
            lblVersion.Text = "Closed Beta " & .Version.ToString & " (R" & .Version.Build & ")"
            lblCopyright.Text = .Copyright
            lblUserInfo.Text = "Phiên bản chính thức : " & .Version.ToString & " (R" & .Version.Build & ")"
        End With
    End Sub

    Private Sub lblWebsite_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lblWebsite.LinkClicked
        System.Diagnostics.Process.Start(lblWebsite.Text)
    End Sub

    Private Sub lblEmail_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lblEmail.LinkClicked
        System.Diagnostics.Process.Start("mailto:" & lblEmail.Text)
    End Sub

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        Me.Close()
    End Sub

    Private Sub btnAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbout.Click
        TimerMain.Enabled = False
        tabAbout.Tabs("about").Selected = True
    End Sub

    Private Sub btnHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHelp.Click
        tabAbout.Tabs("support").Selected = True
        TimerMain.Enabled = True
    End Sub

    Private Sub tabAbout_ActiveTabChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabControl.ActiveTabChangedEventArgs) Handles tabAbout.ActiveTabChanged
        If e.Tab.Key = "support" Then
            btnHelp.Visible = False
            btnAbout.Visible = True
            btnAbout.Focus()
            btnOK.Location = New Point(321, 344)
        Else
            btnHelp.Visible = True
            btnAbout.Visible = False
            btnHelp.Focus()
            btnHelp.Location = New Point(226, 343)
            btnOK.Location = New Point(359, 344)
        End If
    End Sub

End Class